﻿using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ServiceModel;
using System.ServiceModel.Activation;
using Biljart.Model.Validator;

namespace Services.Validation
{
    [ServiceContract(Namespace = "")]
    [SilverlightFaultBehavior]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class UserValidationWebService
    {
        private readonly UserValidator _userValidator;

        public UserValidationWebService()
        {
            _userValidator = new UserValidator();
        }

        [OperationContract]
        public Dictionary<string, ObservableCollection<string>> ValidateUsername(string username)
        {
            return _userValidator.ValidateUsername(username);
        }
    }
}
